package com.lqm.service.home;

import com.lqm.entity.home.Project;
import com.lqm.entity.home.ProjectScore;

import java.util.List;

public interface ProjectScoreService {
    /**
     * 保存一次评分，不允许重复评分
     * @param projectScore
     * @return 0：重复 1：成功
     */
    int saveScore(ProjectScore projectScore);

    /**
     * 获取所有的评分
     * @param project
     * @return
     */
    List<ProjectScore> getAllProjectScoreByProject(Project project);

    /**
     * 获取某个项目的评分的平均分
     * @param project
     * @return
     */
    Double findAvgByProjectId(Project project);

    List<ProjectScore> findAllScoreByProject(Project project, int limit, int page);
}
